package lab02.test30;

import java.util.Scanner;

/**
 * Created by 123 on 2017/12/29.
 */
public class Test30 {
    public static void main(String[] args) {
        double sum = 0;
        String[] course = {"语文","数学","外语"};
        double[] score = new double[3];

        Scanner sc = new Scanner(System.in);

        for (int i = 0; i < course.length; i++) {
            System.out.println("请输入"+course[i]+"成绩：");
            score[i] = sc.nextDouble();
            sum+=score[i];
        }

        System.out.println("平均成绩："+(sum/score.length));
    }

}

